package it.polito.connectedcar.tcc;

import it.polito.connectedcar.message.OutgoingMessage;
import it.polito.connectedcar.message.TCCFromTrafficLightMessage;
import it.polito.connectedcar.message.TCCFromVehicleMessage;

import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * the TCC uses many queues , each of them containing messages either to be sent
 * or received by different entities. This class is in charge of instantiating
 * the queues and making them available to message processors and the network
 * layers
 * 
 * @author Nicola Aresta
 * 
 */
public class TCCQueuesWrapper {

	private BlockingQueue<TCCFromVehicleMessage> readMessagesQueue;

	private BlockingQueue<OutgoingMessage> toWriteMessagesQueue;
	private BlockingQueue<TCCFromTrafficLightMessage> trafficLightReadMessageQueue;

	public TCCQueuesWrapper() {

		this.readMessagesQueue = new LinkedBlockingQueue<TCCFromVehicleMessage>();
		this.toWriteMessagesQueue = new LinkedBlockingQueue<OutgoingMessage>();
		this.trafficLightReadMessageQueue = new LinkedBlockingQueue<TCCFromTrafficLightMessage>();
	}

	public BlockingQueue<TCCFromVehicleMessage> getReadMessagesQueue() {
		return readMessagesQueue;
	}

	public BlockingQueue<OutgoingMessage> getToWriteMessagesQueue() {
		return toWriteMessagesQueue;
	}

	public BlockingQueue<TCCFromTrafficLightMessage> getTrafficLightReadMessageQueue() {
		return trafficLightReadMessageQueue;
	}

}
